package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 * @Author rsq
 * @date 2023/5/15  17:46
 * @Description:
 */
public class YouXinUtil {


    public static Integer getSocialInsurance(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return 0;
        } else  if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(), shebao)) {
            return 10;
        }
        return 20;
    }


    public static Integer getprofession(String profession) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(), profession)) {
            return 200;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), profession)) {
            return 400;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz005.getValue(), profession)) {
            return 900;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz003.getValue(), profession)) {
            return 300;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), profession)) {
            return 800;
        }
        return 200;
    }

    public static Integer getshouru(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr002.getValue(), shouru)) {
            return 10000;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr003.getValue(), shouru)) {
            return 20000;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr004.getValue(), shouru)) {
            return 30000;
        }
        return 5000;
    }


    public static Integer getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return 0;
        }else  if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(), gongjijin)) {
            return 10;
        }
        return 10;
    }


    public static Integer getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return 0;
        }else if (StrUtil.equals(BaseTypeInfoEnum.Car.car003.getValue(), car)) {
            return 10;
        }
        return 20;
    }


    public static Integer getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return 0;
        }  else if (StrUtil.equals(BaseTypeInfoEnum.House.hu004.getValue(), house)) {
            return 10;
        }
        return 20;
    }


    public static Integer getbaodan(String baodan) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baodan)) {
            return 0;
        }else if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx002.getValue(), baodan)) {
            return 10;
        }
        return 20;
    }


    public static Integer getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return 5;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return 10;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return 20;
        }
        return 3;

    }



    public static Integer getZhimaScore(String zhima) {
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm005.getValue(), zhima)) {
            return 40;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(), zhima)) {
            return 30;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(), zhima)) {
            return 20;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm001.getValue(), zhima)) {
            return 0;
        }
        return 10;
    }

}
